const fs = require("fs");
const path = require("path");
// 4. 文件流操作
// fs.createReadStream
// 创建一个读取文件的流，可以用于处理大文件，分块读取文件内容
const readStream = fs.createReadStream(
  path.join(__dirname, "dir", "test", "test.txt"),
  "utf8"
);
readStream.on("data", (chunk) => {
  console.log(chunk);
});
